#include<iostream>
#include<queue>
using namespace std;
int main()
{
	queue<int> q;
	q.push(1);
	q.push(12);
	q.push(51);
	q.push(14);

	while (!q.empty())
	{
		cout << q.front() << " ";
		q.pop();
	}
	cout << endl;
	return 0;
}